import { Input } from 'antd';

const MyInput = (props) => {
  const { parent, name, value, ...restProps } = props;
  const handleBlur = (e) => {
    parent.setFieldValue(name, e.target.value.trim())
  };
  return (
    <Input
      value={value}
      onBlur={handleBlur}
      {...restProps}
    />
  )
}

export default MyInput;
